import IMenuPageForm from '@/model/form/menu/IMenuPageForm'
import IResVO from '@/model/vo/common/IResVO'
import IMenuVO from '@/model/vo/menu/IMenuVO'
import $http from '@/util/http'
import { AxiosResponse } from 'axios'

// 查询菜单（树结构）
export default function menuTreeApi(
  form: IMenuPageForm = {
    defaultOrderFlag: true,
    orderList: [{ name: 'orderNo', value: 'descend' }],
  }
) {
  return $http.post<IResVO, AxiosResponse<IResVO<IMenuVO[]>>, IMenuPageForm>(
    '/menu/tree',
    form
  )
}
